const mongoose = require('mongoose');
//自动创建Children插件----》
var mongoosePaginate = require('mongoose-materialized');

//约束
var schema = new mongoose.Schema({
   type:mongoose.Schema.Types.ObjectId,
   text:String
});
//引入插件
schema.plugin(mongoosePaginate);

//实例化
module.exports=mongoose.model('Cate',  schema, 'cate'); // Model.paginate()
